Optimal. Leaf size=68 \[ \frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+3 a b^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2792, 3023, 2735, 3770} \[ \frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+3 a b^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2792
Rule 3023
Rule 3770
Rubi steps
\begin {align*} \int \csc ^2(e+f x) (a+b \sin (e+f x))^3 \, dx &=-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\int \csc (e+f x) \left (3 a^2 b+3 a b^2 \sin (e+f x)-b \left (a^2-b^2\right ) \sin ^2(e+f x)\right ) \, dx\\ &=\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\int \csc (e+f x) \left (3 a^2 b+3 a b^2 \sin (e+f x)\right ) \, dx\\ &=3 a b^2 x+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}+\left (3 a^2 b\right ) \int \csc (e+f x) \, dx\\ &=3 a b^2 x-\frac {3 a^2 b \tanh ^{-1}(\cos (e+f x))}{f}+\frac {b \left (a^2-b^2\right ) \cos (e+f x)}{f}-\frac {a^2 \cot (e+f x) (a+b \sin (e+f x))}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.54, size = 87, normalized size = 1.28 \[ \frac {a^3 \tan \left (\frac {1}{2} (e+f x)\right )+a^3 \left (-\cot \left (\frac {1}{2} (e+f x)\right )\right )+6 a b \left (a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+b (e+f x)\right )-2 b^3 \cos (e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.50, size = 99, normalized size = 1.46 \[ -\frac {3 \, a^{2} b \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 3 \, a^{2} b \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) + 2 \, a^{3} \cos \left (f x + e\right ) - 2 \, {\left (3 \, a b^{2} f x - b^{3} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, f \sin \left (f x + e\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.27, size = 72, normalized size = 1.06 \[ 3 a \,b^{2} x -\frac {a^{3} \cot \left (f x +e \right )}{f}-\frac {b^{3} \cos \left (f x +e \right )}{f}+\frac {3 a^{2} b \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{f}+\frac {3 a \,b^{2} e}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 68, normalized size = 1.00 \[ \frac {6 \, {\left (f x + e\right )} a b^{2} - 3 \, a^{2} b {\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, b^{3} \cos \left (f x + e\right ) - \frac {2 \, a^{3}}{\tan \left (f x + e\right )}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.72, size = 194, normalized size = 2.85 \[ \frac {a^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{2\,f}-\frac {a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a^3+4\,b^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}+\frac {6\,a\,b^2\,\mathrm {atan}\left (\frac {36\,a^2\,b^4}{36\,a^3\,b^3-36\,a^2\,b^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}+\frac {36\,a^3\,b^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{36\,a^3\,b^3-36\,a^2\,b^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f}+\frac {3\,a^2\,b\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (e + f x \right )}\right )^{3} \csc ^{2}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________